/*
 * @Autor: lingchen.liu
 * @Date: 2022-02-09 15:22:31
 * @LastEditors: lingchen.liu
 * @LastEditTime: 2022-02-09 17:23:37
 * @emial: lingchen.liu@bizfocus.cn
 */
import React, { FC, ReactElement } from 'react';
import Modal from '..';
import { ITodo } from '../../../types';
import './index.scss'

interface ICheckModal {
    isShowCheckModal: boolean,
    data: ITodo,
    closeModal: () => void
}

const CheckModal: FC<ICheckModal> = ({ isShowCheckModal, data, closeModal }): ReactElement => {

    const { id, content, completed } = data
    return (
        <Modal isShowModal={isShowCheckModal} modalTitle="查看事件">
            <p className='topic'>{id}</p>
            <p className='topic'>{content}</p>
            <p className='topic'>{completed ? '已完成' : '未完成'}</p>
            <button
                className='btn btn-primary comfirm-btn'
                onClick={closeModal}
            >
                确定
            </button>
        </Modal>
    )
}

export default CheckModal